#ifndef __AABB_H__
#define __AABB_H__

#include <Util/Vec3.h>

/*! \class Aabb
  * \brief Manage Axis Aligned Bounding Boxes
  * \author Anthony BIGOT & Vincent LOPPIN
  * \version 1.0
  */
class Aabb {
public :
    Aabb();

    /// Draw the bounding box (GL_LINES mode)
    void draw() const;

    /// Reset all params to default values
    void reset();

    /*** ATTRIBUTE ACCESSORS ***/
    /// Return the center of the bounding box
    Vec3f getCenter() const { return (m_Upper + m_Lower) / 2.0; }

    /// Return the size of the bounding box
    Vec3f getSize() const { return m_Upper - m_Lower; }

    /// Return the lower corner (const method)
    const Vec3f & getLower() const { return m_Lower; }

    /// Return the upper corner (const method)
    const Vec3f & getUpper() const { return m_Upper; }

private:
    Vec3f	m_Lower,	///< Lower corner of the box
            m_Upper;	///< Upper corner of the box
};

#endif //__RENDER_AABB_H__
